<?php
/**
 * redis 工具类
 * User: Administrator
 * Date: 2018/7/27
 * Time: 14:01
 */

namespace app\common\lib;

class Redis
{
    /**
     * @var string 验证码 redis key的前缀
     */
    public static $pre = "sms_";

    /**
     * @var string 用户pre的前缀
     */
    public static $userpre = "user_";

    /**
     * 存储验证 redis key
     * @param $phone
     * @return string
     */
    public static function smsKey($phone)
    {
        return self::$pre . $phone;
    }

    /**
     * 用户的key
     * @param $phone
     * @return string
     */
    public static function userKey($phone)
    {
        return self::$userpre . $phone;
    }

}